package com.topvision.service.impl;

import com.topvision.domain.SysOrder;
import com.topvision.repository.SysOrderRepository;
import com.topvision.service.SysOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysOrderServiceImpl  implements SysOrderService{

    @Autowired
    private SysOrderRepository sysOrderRepository;

    @Override
    public void save(SysOrder sysOrder) {
        sysOrderRepository.save(sysOrder);
    }

    @Override
    public List<SysOrder> findByUserId(Long id) {
        return sysOrderRepository.findByUserId(id);
    }

    @Override
    public List<SysOrder> findSysOrdersByIdIn(Long[] id) {
        return sysOrderRepository.findSysOrdersByIdIn(id);
    }
}
